package com.htl.集合;

import java.util.Stack;

public class Stack__test {
    public static void main(String[] args) {
        Stack stack = new Stack();
        stack.push("Hello");
        stack.push("JavaSE");
        stack.push("JavaME");
        stack.push("JavaEE");
        System.out.println(stack);
        //将栈顶元素的值取出，但是栈顶元素不会删除
        System.out.println(stack.peek());
        //直接弹出栈顶元素
        System.out.println(stack.pop());
        System.out.println(stack.pop());
        System.out.println(stack.pop());
    }
}
